package com.lyl.goods.service.impl;


import com.lyl.goods.mapper.AdminMapper;
import com.lyl.goods.pojo.User;
import com.lyl.goods.service.AdminService;
import com.lyl.goods.utils.Md5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;
    @Override
    public User find(String username) {
        return adminMapper.find(username);
    }

    @Override
    public void registerAdmin(String username, String password) {
        String md5String = Md5Util.getMD5String(password);
        adminMapper.register(username,md5String);
    }

}
